<!-- 首页的banner图 -->

<template>
	<view class="home-box-t">
		<!-- banner图 -->
		<swiper class="swiper-box" circular autoplay :duration="1000" indicator-dots :interval="5000">
			<swiper-item v-for="(item,index) in BannerList" :key="index" @tap="handleGo(item)">
				<image style="border-radius: 16rpx;" :src="item.picUrl"></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	
	// 引入vuex
	import {
		mapState,
		mapGetters,
		mapActions,
		mapMutations
	} from 'vuex'
	
	export default {
		data() {
			return {
				
			};
		},
		computed:{
			...mapGetters(['BannerList']),
		},
		methods:{
			handleGo({
				id,
				type,
				jumpUrl
			}) {
				if (type === 2) {
					uni.navigateTo({
						url:jumpUrl
					})
				} else if (type === 1) {
					location.href = jumpUrl
				}
			},
		}
	}
</script>

<style lang="less">

</style>
